﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ServiceSATT;

namespace ReporteSATT
{
    public class ReporteEntidades
    {
        DataSet.DsEntidades ds = new ReporteSATT.DataSet.DsEntidades();
        public CrystalDecisions.CrystalReports.Engine.ReportClass ListadoFederacion()
        {
            RptFederacion rpt = new RptFederacion();
            IFederacionService historia = new FederacionService();
            ds.DtFederacion.Merge(historia.ReporteFederacion());
            string url = System.AppDomain.CurrentDomain.BaseDirectory;
            rpt.FileName = "rassdk://" + url + "\\Reportes\\RptFederacion.rpt";
            rpt.SetDataSource(ds);
            return rpt;
        }

        public CrystalDecisions.CrystalReports.Engine.ReportClass ListadoSedes()
        {
            RptSede rpt = new RptSede();
            ISedeService historia = new SedeService();
            ds.DtSede.Merge(historia.ReporteSede());
            string url = System.AppDomain.CurrentDomain.BaseDirectory;
            rpt.FileName = "rassdk://" + url + "\\Reportes\\RptSede.rpt";
            rpt.SetDataSource(ds);
            return rpt;
        }

        public CrystalDecisions.CrystalReports.Engine.ReportClass ListadoClub()
        {
            RptListadoClub rpt = new RptListadoClub();
            IClubService historia = new ClubService();
            ds.DtClub.Merge(historia.ReporteClub());
            string url = System.AppDomain.CurrentDomain.BaseDirectory;
            rpt.FileName = "rassdk://" + url + "\\Reportes\\RptListadoClub.rpt";
            rpt.SetDataSource(ds);
            return rpt;
        }

    }
}
